<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>register</title>
    <link rel="stylesheet" href="/static/css/register.css"/>
    <script type="text/javascript" src="../static/js/include.js?jquery,validation,dvs"></script>
</head>
<script type="text/javascript">
    var registerFormValidator = null;
    function load() {
        registerFormValidator = $("#registerForm").validate({
            rules : {
                UT_EMAIL : {
                    required : true,
                    isEmail:true
                }
            },
            messages : {
                UT_EMAIL : {
                    required : "邮箱必填！",
                    isEmail:"请输入正确的邮箱地址"
                }
            },
            wrapper : "div"
        });
    }
    function doRegister() {
        if (!registerFormValidator.form()) {
            return false;
        }
        dvs.ajax({
            url : "/register/doRegister",
            loading : "modal",
            form : "registerForm",
            callback : function(json) {
                dvs.alert(json.message);
            }
        })
    }
</script>
<body onload="load()">
<form id="registerForm">
<div class="login">
    <h2>用户注册</h2>
    <div class="login_box">
        <input type="text" required="required"  name="ut_userid">
        <label>用户名</label>
    </div>
    <div class="login_box">
    <input type="password" required="required"  name="ut_password">
    <label>设定密码</label>
</div>
    <div class="login_box">
        <input type="email" required="required" id="UT_EMAIL"  name="UT_EMAIL">
        <label>电子信箱</label>
    </div>
    <div class="login_box">
        <input type="text" required="required"  name="UT_PERSONID">
        <label>身份证号</label>
    </div>
    <a href="javascript:void (0);" onclick="doRegister()">
        注册
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </a>
</div>
</form>
</body>
</html>
